<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/conn.asp"-->
<!--#include file="lib/json_lastest.asp"-->
<!--#include file="lib/json_util_lastest.asp"-->
<!--#include file="lib/saferequest.asp"-->

<%
Response.ContentType = "application/json"
sql="SELECT id,RIGHT(rq,LEN(rq)-5) AS rq,LEFT(sj,LEN(sj)-3) AS sj,dd,LEFT(customer_name,12) as customer_name,tx,hx,xx,teu FROM (SELECT id,rq,sj,dd,yb_customer,tx,hx,xx,INT(xx/20) AS teu FROM yb WHERE cyr=0) AS yb LEFT JOIN customer ON yb.yb_customer=customer.customer_id ORDER BY rq DESC,sj ASC "
QueryToJSON(conn,sql).Flush

conn.close
set conn=nothing

%>
